<div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" id="newlyAdded">
	<div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title pull-left">机构管理 — 新增</h4>
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

            </div>
            <div class="modal-body text-center">
				
            	<div class="bg-model overflow-hide">

            		<form name="newlyAddedForm">

                		<div class="col-xs-12 col-sm-6">
							
	            			<div class="form-group">
								<label class="col-xs-12 col-sm-3 control-label text-right">上级机构：</label>
								<div class="col-xs-12 col-sm-9">
									<input type="text" 
										   class="form-control readonly"
										   readonly 
										   ng-model="institutionName" 
										   />
								</div>
							</div>

	                        <div class="form-group">
	                            <label class="col-xs-12 col-sm-3 control-label text-right">机构名称：</label>
	                            <div class="col-xs-12 col-sm-9">
	                                <input type="text"
	                                	   name="institutionName"
	                                	   class="form-control"
	                                	   autocomplete="off" 
	                                	   ng-model="newlyAdded_institutionName"
	                                	   required 
	                                	   />
	                                <label class="red required">*</label>
	                                <div class="error" ng-show="newlyAddedForm.institutionName.$dirty && newlyAddedForm.institutionName.$invalid">
									    <small class="error pull-left" ng-show="newlyAddedForm.institutionName.$error.required">请输入机构名称</small>
		 							</div>
	                            </div>       
	                        </div>
	                        <div class="form-group " >
	                            <label class="col-xs-12 col-sm-3 control-label text-right">显示名称：</label>
	                            <div class="col-xs-12 col-sm-9">
	                                <input type="text"
	                                	   name="institutionDisplayName"
	                                	   class="form-control"
	                                	   autocomplete="off" 
	                                	   ng-model="newlyAdded_institutionDisplayName"
	                                	   required 
	                                	   />
	                                <label class="red required">*</label>
	                                <div class="error" ng-show="newlyAddedForm.institutionDisplayName.$dirty && newlyAddedForm.institutionDisplayName.$invalid">
									    <small class="error pull-left" ng-show="newlyAddedForm.institutionDisplayName.$error.required">请输入显示名称</small>
		 							</div>
	                            </div>       
	                        </div>
	                        <div class="form-group ">
	                            <label class="col-xs-12 col-sm-3 control-label text-right">性质：</label>
	                            <div class="col-xs-12 col-sm-9">
	                                <input type="text"
	                                	   name="nature"
	                                	   class="form-control"
	                                	   autocomplete="off" 
	                                	   ng-model="newlyAdded_nature"
	                                	   required 
	                                	   />
	                                <label class="red required">*</label>
	                                <div class="error" ng-show="newlyAddedForm.nature.$dirty && newlyAddedForm.nature.$invalid">
									    <small class="error pull-left" ng-show="newlyAddedForm.nature.$error.required">请输入性质</small>
		 							</div>
	                            </div>       
	                        </div>
	                         <div class="form-group ">
	                            <label class="col-xs-12 col-sm-3 control-label text-right">联系人：</label>
	                            <div class="col-xs-12 col-sm-9">
	                                <input type="text"
	                                	   name="contactName"
	                                	   class="form-control"
	                                	   autocomplete="off" 
	                                	   ng-model="newlyAdded_contactName"
	                                	   required 
	                                	   />
	                                <label class="red required">*</label>
	                                <div class="error" ng-show="newlyAddedForm.contactName.$dirty && newlyAddedForm.contactName.$invalid">
									    <small class="error pull-left" ng-show="newlyAddedForm.contactName.$error.required">请输入联系人</small>
		 							</div>
	                            </div>       
	                        </div>
	                        <div class="form-group ">
	                            <label class="col-xs-12 col-sm-3 control-label text-right">行业：</label>
	                            <div class="col-xs-12 col-sm-9">
	                                <input type="text"
	                                	   name="industry"
	                                	   class="form-control"
	                                	   autocomplete="off" 
	                                	   ng-model="newlyAdded_industry"
	                                	   required 
	                                	   />
	                                <label class="red required">*</label>
	                                <div class="error" ng-show="newlyAddedForm.industry.$dirty && newlyAddedForm.industry.$invalid">
									   <small class="error pull-left" ng-show="newlyAddedForm.industry.$error.required">请输入行业</small>
		 							</div>
	                            </div>       
	                        </div>
	                        
	                        <div class="form-group ">
	                            <label class="col-xs-12 col-sm-3 control-label text-right" >机构类型：</label>
	                            <div class="col-xs-12 col-sm-9">
	                                <select name="institutionType"  
	                                		class="pull-left" 
	                                		required 
	                                		ng-model="newlyAdded_institutionType" 
	                                		required
	                                		>
	                                	<option  value="" >请选择</option>
										<option  value="0">客户机构</option>
										<option  value="1">代理商</option>
										<option  value="2">应用提供商</option>
										<option  value="3">供应商</option>
									</select>
									<div class="error" ng-show="newlyAddedForm.institutionType.$dirty && newlyAddedForm.institutionType.$invalid">
									    <small class="error pull-left" ng-show="newlyAddedForm.institutionType.$error.required">请选择机构类型</small>
		 							</div>
	                            </div>       
	                        </div>
	                        <div class="form-group ">
	                            <label class="col-xs-12 col-sm-3 control-label text-right" >机构状态：</label>
	                            <div class="col-xs-12 col-sm-9">
	                                <select name="enabled"  
	                                		class="pull-left" 
	                                		required
	                                		ng-model="newlyAdded_enabled" 
	                                		>
	                                	<option  value="" >请选择</option>
										<option  value="0">禁用</option>
										<option  value="1">启用</option>
									</select>
									<div class="error" ng-show="newlyAddedForm.enabled.$dirty && newlyAddedForm.enabled.$invalid">
									   	<small class="error pull-left" ng-show="newlyAddedForm.enabled.$error.required">请选择机构状态</small>
		 							</div>
	                            </div>       
	                        </div>
	                        
	                    </div> 

	                    <div class="col-xs-12 col-sm-6">

	            			<div class="form-group">
								<label class="col-xs-12 col-sm-3 control-label text-right"></label>
								<div class="col-xs-12 col-sm-9">
									<input type="hide" class="form-control readonly">
								</div>
							</div>

	                        <div class="form-group ">
		                            <label class="col-xs-12 col-sm-3 control-label text-right">到期日期：</label>
		                            <div class="col-xs-12 col-sm-9">
		                                <input type="date"
		                                	   name="validDate"
		                                	   class="form-control"
		                                	   autocomplete="off" 
		                                	   required 
		                                	   ng-model="newlyAdded_validDate"
		                                	   />
		                                <label class="red required">*</label>
		                                <div class="error" ng-show="newlyAddedForm.validDate.$dirty && newlyAddedForm.validDate.$invalid">
										    <small class="error pull-left" ng-show="newlyAddedForm.validDate.$error.required">请选择到期日期</small>
			 							</div>
		                            </div>       
	                        </div>
	                        <div class="form-group ">
	                            <label class="col-xs-12 col-sm-3 control-label text-right">电话：</label>
	                            <div class="col-xs-12 col-sm-9">
	                                <input type="text" 
	                                	   name="phone" 
	                                	   class="form-control" 
	                                	   autocomplete="off" 
	                                	   ng-model="newlyAdded_phone"
	                                	   />
	                            </div>       
	                        </div>
	                        <div class="form-group ">
	                            <label class="col-xs-12 col-sm-3 control-label text-right">邮编：</label>
	                            <div class="col-xs-12 col-sm-9">
	                                <input type="text" 
	                                	   name="postcode"
	                                	   class="form-control" 
	                                	   autocomplete="off"
	                                	   ng-model="newlyAdded_postcode"
	                                	   />
	                            </div>       
	                        </div>	                        
	                         <div class="form-group">
	                            <label class="col-xs-12 col-sm-3 control-label text-right">省份：</label>
	                            <div class="col-xs-12 col-sm-9">
	                                <input type="text" 
	                                	   name="province" 
	                                	   class="form-control"
	                                	   autocomplete="off" 
	                                	   ng-model="newlyAdded_province"
	                                	   />
	                            </div>       
	                        </div>
	                        <div class="form-group">
	                            <label class="col-xs-12 col-sm-3 control-label text-right">城市：</label>
	                            <div class="col-xs-12 col-sm-9">
	                                <input type="text" 
	                                	   name="city"
	                                	   class="form-control" 
	                                	   autocomplete="off" 
	                                	   ng-model="newlyAdded_city"
	                                	   />
	                            </div>       
	                        </div>
	                        <div class="form-group">
	                            <label class="col-xs-12 col-sm-3 control-label text-right">地址：</label>
	                            <div class="col-xs-12 col-sm-9">
	                                <input type="text" 
	                                	   name="address" 
	                                	   class="form-control"
	                                	   autocomplete="off" 
	                                	   ng-model="newlyAdded_address"
	                                	   />
	                            </div>       
	                        </div>
                        </div>
					
						<div class="col-xs-12 col-sm-12">
							<div class="form-group">
	                            <label class="col-xs-12 col-sm-2 control-label pull-left describe">描述：</label>
	                            <div class="pull-left describe">
	                                <textarea rows="5" 
                                              type="text" 
                                              name="description" 
                                              class="form-control" 
                                              ng-model="newlyAdded_description"
                                              />
                            		</textarea>
	                            </div>       
	                        </div>
						</div>

						<div class="col-sm-12">
						    <div class="popup-footer modal-footer">
						    	<button type="button"
						    			class="btn btn-primary" 
						        		data-dismiss="modal"
						    			>取消
				    			</button>
				        		<button type="button" 
						        		class="btn btn-primary" 
						        		data-dismiss="modal"
						        		ng-disabled="newlyAddedForm.$invalid"
						        		ng-click="submitNewlyAdded()" 
						        		>确定新增
				        		</button>
					        </div>
						</div>
                   
  					</form>
                 	
                 </div>
            </div>
            
        </div>
    </div>
</div>

